package com.itcam.interview.pro01javase;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author : Cammy.Wu
 * Description : 
 */

public class Demo07Equals {
    public static void main(String[] args) {

        String s1 = new String("abc");
        String s2 = new String("abc");
        System.out.println(s1 == s2);
        System.out.println(s1.equals(s2));
        System.out.println(s1.hashCode() + "  " + s2.hashCode());
    }
}

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
class Person {
    private Integer id;
    private String name;

    public Person(String name) {
        this.name = name;
    }
}